﻿using System;
using System.Data.Linq.Mapping;

using LeanEngine.Entity;
using LeanEngine.Validation;
using System.Collections.Generic;

namespace LeanEngine.Business.Security.Entity
{
    /// <summary>
    /// Represents a functionality of the application.
    /// </summary>
    [Table(Name = "ApplicationFuncionality")]
    [Serializable]
    public class ApplicationMethod : ChangeTrackerEntity
    {
        /// <summary>
        /// Gets or sets the identification of the funcionality.
        /// </summary>
        [Column(Name = "FuncID", IsPrimaryKey = true, IsDbGenerated = true)]
        public int ID
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the name of the functionality.
        /// </summary>
        [Column(Name = "FuncName")]
        [IsNotEmpty(typeof(Resource.ErrorMessages), "AppMethodNameRequired")]
        public string Name
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the description of the functionality.
        /// </summary>
        [Column(Name = "Description")]
        public string Description
        {
            get;
            set;
        }
    }
}
